package Task2;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadPool {
    public static void main(String[] args) {
        //1. 创建一个线程池任务数量为10
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        //2. 从线程池中拿出一个来执行任务
        executorService.submit(new ThreadRunnable());
        //3. 关闭线程池
        executorService.shutdown();

    }
}
